package ae.pcfc.cldos.online.common.tscdb.dao.provider;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.springframework.stereotype.Repository;

import ae.pcfc.cldos.online.common.dao.GenericDAO;
import ae.pcfc.cldos.online.common.tscdb.dao.TTscCountryDAO;
import ae.pcfc.cldos.online.common.tscdb.domain.TTscCountry;

/**
 * Country Dao
 * 
 * @author arosa
 *
 */
@Repository
public class TTscCountryDAOImpl extends GenericDAO implements TTscCountryDAO {

	@SuppressWarnings("unchecked")
	public List<TTscCountry> getCountriesList(){
		DetachedCriteria criteria = DetachedCriteria.forClass(TTscCountry.class);
		criteria.addOrder(Order.asc(TTscCountry.__COUNTRY_NAME));
		List<TTscCountry> res = (List<TTscCountry>)getListByCriteria(criteria);
		return res;
	}
}
